<?php

namespace Acme\StudyBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class StudyController extends Controller
{
    public function indexAction($name)
    {
        /*
         * The action's view can be rendered using render() method
         * or @Template annotation as demonstrated in DemoController.
         *
         */
        //return $this->render('AcmeStudyBundle:Hello:index.html.twig', array('name' => $name));
        $engine = $this->container->get('templating');
        $content = $engine->render('AcmeStudyBundle:Study:index.html.twig' , array('name' => $name));
        return new Response($content);
    }
    
    public function englishAction($name){
	return new Response('<html><body>I am Study English Book '.$name.'!</body></html>');
    }
    
    public function loginAction(){
	return new Response('<html><body>Page login</body></html>');
    }
}
